package part2;

// 假设司机开着车，拿着武器，吃着面包
public class Main {
    public static void main(String[] args) {
        AbstractFactory factory = new ModernFactory();
        Vehicle vehicle = factory.createVehicle();
        Weapon weapon = factory.createWeapon();
        Food food = factory.createFood();

        vehicle.go();
        weapon.shoot();
        food.printName();
    }
}
